package com.ocom.oauth.client;

import com.ocom.common.constant.HumanServiceUrl;
import com.ocom.common.entity.human.EntityDeptInfo;
import com.ocom.common.entity.master.EntityWechatPerInfo;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.human.UserInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "human")
public interface HumanClientService {
    /**
     * 添加微信人员
     * @param wechatPerInfo
     */
    @PostMapping(HumanServiceUrl.URLP_HUAMN_ADD_WXPER)
    void addWxper(@RequestBody  EntityWechatPerInfo wechatPerInfo);


    @PostMapping(HumanServiceUrl.URL_getWxAdminInfo)
    public Result getWxAdminInfo(@RequestParam("appId")String appId,@RequestParam("openId") String openId);

    @PostMapping(HumanServiceUrl.URL_PersonnelGetPersonInfo)
    public Result PersonnelGetPersonInfo(@RequestBody UserInfoVo userInfoVo);

    /**
     * 获取微信人员(getWxPerson)
     * */
    @GetMapping(HumanServiceUrl.URL_GetWxPerson)
    public Result GetWxPerson(@RequestParam("appId")String appId,@RequestParam("openId")String openId);


    @PostMapping(HumanServiceUrl.URL_Department_GetDeptList)
    public Result<List<EntityDeptInfo>> getDeptList(@RequestParam("companyId") Long companyId, @RequestParam("deptId") Long deptId, @RequestParam("show") Integer show);

}
